< previous page page_299 next page >

Page 299
By combining these controls with the data-access programming you learned in yesterday's lesson, you can design a control that will solve the problem described earlier. Along the way you'll see how to use the control design and property page wizards to enhance the control you've created. In this section, you'll create the basic control interface and set the properties, methods, and events for the control. Then in the next section, you'll add code to this control to include the enhanced functionality you want.
To begin building the new control, open a new project and select ActiveX Control in the New Project dialog box. If you're using the Control Creation Edition, you can still open a new project and select the ActiveX Control icon that appears. Although Professional and Enterprise Edition programmers can access the Control Creation icon from within Visual Basic, Standard Edition programmers will have to start the separate application. The remaining steps are the same for every edition.
After you open a new ActiveX control project, you should notice some differences in the display (see Figure 11.1).
12181-0299a.gif
Figure 11.1.
The ActiveX control design window doesn't have a title bar or a border.
The biggest difference is that the displayed work area has no title bar or borders like standard form work areas. This serves as a reminder that you're not creating a form. When creating a new control, Visual Basic generates a default control class call UserControl. Visual Basic then assigns default properties, events, and methods to the control. To go beyond these defaults, you need to modify these values and routines to make the control perform the way you want it to.

 
< previous page page_299 next page >

If you like this book, buy it!